package cate.game.role.farm.dailyfb.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdDailyFb;
import cate.game.role.farm.dailyfb.MopType;

import java.util.List;

public class DailyFbAllBatchMopReq implements MsgInput {
    public List<MopType> types;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getFarm().dailyFb.allBatchMopAll(types);
        if (r.ok()) {
            cc.getRole().sendNow(new DailyFbDataResp(cc.getRole()));
        } else {
            game.notice.message(cc.getRole(), r, true);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdDailyFb.DAILYFB_ALL_BATCH_MOP_REQ;
    }
}
